package fire.object;

import fire.Main;
import fire.room.FactoryMap;

public class TerrainPortal extends TerrainObject {
	protected String name;

	public TerrainPortal(String map, double x, double y) {
		super(map, x, y, 0, "TerrainPortal", 25, 36, 50, 50);
		this.name = map;
	}

	@Override
	public void move() {
		if (checkCollision(9999, 0, 0) == 9999) {
			Main.changeMap(FactoryMap.mapList.get(this.name));
		}
	}
}
